My current favorite theory for that particular effect is that whenever there is an NMDA spike, all the synapses in that segment always undergo a very small decay. Then, if the cell actually initiates an action potential, the synapses get reinforced (potentiated, via the back action potential). This turns out to have the identical net effect as that piece of code.
I don’t know of direct biological evidence for the first part (the decay) but some neuroscientists I have spoken to say it is quite plausible. There is already evidence for the second part in this paper:
 1. A. Losonczy, J. K. Makara, J. C. Magee, Compartmentalized dendritic plasticity and input feature storage in neurons. Nature. 452, 436–41 (2008).