Actually, there's an isExpired(long) method already, but my question stands.