public function isTokenExpired(string $token): bool
    {
        if (!$this->isTokenValid($token)) {
            throw new \InvalidArgumentException('This token is invalid');
        }
        $tokenData = $this->decryptToken($token);
        $tokenExpiration = $tokenData['generated'] + $tokenData['validForSeconds'];

        return $tokenExpiration < time();
    }