Modified isInGracePeriod method to also consider the original expiration time.