Fix race condition in testExpiresAsString

Calling time functions twice in a row isn't guaranteed to get you the
same results.