checks the cookie's expiry