One of the simplest methods may be to use two commands: One that does the actual timing, and one that triggers off of the keypress.
That way, you can use the "Stop Another Command" action to stop the timing command, and start a new instance.
E.G.
your "Timer" command could contain
Pause 25 seconds
Say, 'Timer elapsed'
and your triggered command could contain
Kill command, 'Timer'
Execute command, 'Timer'
Do note that due to optimization, the "Stopped command, 'Timer'" entry will only appear in the log after its pause has elapsed.