only write cookie expiration time if present