Fixed an integer overflow that caused the token to be refreshed too often

Hi all, here is just a quick fix for an integer overflow that causes the expires variable in most cases to always be lower than the current time, which means that the token is always refreshed.