replaced assert with require
Token expiration is now in milliseconds