This is how I do it. Lets just say I named my expression "zulu". In the script editor, I type:
______________
select zulu;
______________
Although this isn't necessary, I then make a set out of my selected expression so that it is very easy to select in the outliner.
You should notice that when you have an expression selected, it has a keyable attribute called "nodeState". When I want to animate the expression off, I set this attribute to "blocking" (although other selections may yield the same result), and then I key it. When I want it to turn it back on, I set it to "Normal" and key it.
hope this helps 
Paul