Check if the cookie is expired.
public function isExpired() : bool { return $this->getExpires() !== null && \time() > $this->getExpires(); }