Im pretty sure it works this way:
Find word wall
Learn word
Kill dragon
Unlock word
Find another word wall
Learn another word
Kill dragon
Unluck new word
Find word wall
Learn word
Kill dragon
Unlock last word
(although you may kill a dragon and get its soul first I just used this order because it was easy)
Edit: that puts the word walls at 60 in the game and that figure sounds more correct to me.
Although that sounds viable, when I saw the gameplay where todd obtained a soul, he upgraded storm call and it said "unlock new word?" and by that is how i figured it would work. You might be right though, and if you are, i hope the walls are static and not random, because it would be ridiculously tedious to upgrade specific ones otherwise.