check if token is valid based on timestamp