Changed Token timestamp storage and testing

Tokens are not necessarily valid for 24h but are issued for a time period from 00:00 to 24:00.
In some cases, the old behavior could return a token even though it wasn't valid anymore.