+ Delete expired tokens from cache and generate new ones, fixes #377

I really needed this fix that was already debated in case #377.
I think this should do it. Tested on my AppEngine application.