Stupidly used an Integer instead of a Long for expiry seconds.