Driver variable not updating
Please note material drivers can be different than a Scale driver. Sometimes you will need to take this somewhat inconvenient step of adding a driver to datablocks view of the outliner.  Get ready for a surprise.

Your material is not shown above.

Select key from the menu ... note the key on panel below.



Note the note from the tooltip from the Lattice Panel which you have already seen. Keys["Key.002"] in my case. Adjust to your case please.  So the toolip is showing two items which must be noted.  Two Strings. 



Tooltip above for reference.



Panel entries.  The two pieces of information from the tooltip are entered above.

In Blender User Preferences verify that scripts are enabled.  You may want to seek fuller explanations of that concept here at BSE.

You may want to see this link about materials.
Driver Expression