Return true if token has expired

@param \Carbon\Carbon $updated
@return bool
358068
protected function tokenExpired(Carbon $updated) : bool
    {
        return Carbon::now()->diffInMinutes($updated) > $this->getTokenLifetime();
    }
1326407
public function deleteExpired()
    {
        if ($this->isExpirationEnabled()) {
            $expiredAt = Carbon::now()->subSeconds($this->expires);

            $this->getTable()->where('created_at', '<', $expiredAt)->delete();
        }
    }
681853
public function isLoginTokenExpired($user) {
        $startTime = strtotime($user->login_token_created_at);
        $now = strtotime(Carbon::now());
        // The time difference is in seconds, we want in minutes
        $timeDiff = ($now - $startTime)/60;
        $minutes2faFormIsLive = config('lasallecmstokenbasedlogin.token_login_minutes_token_is_live');
        if ($timeDiff > $minutes2faFormIsLive) {
            // Login token has expired
            return true;
        }
        return false;
    }
150136
public function isExpired($ttl = 30)
    {
        $last = isset($_SESSION['_last_activity']) ? $_SESSION['_last_activity'] : false;

        if ($last !== false && (time() - $last) > ($ttl * 60)) {
            return true;
        }

        $_SESSION['_last_activity'] = time();

        return false;
    }
1088873
protected function addExpire(Builder $builder): void
    {
        $builder->macro('expire', function (Builder $builder) {
            return $builder->update(['expired_at' => Date::now()]);
        });
    }
645889
public function isAccessTokenExpired()
  {
    if (!$this->token || !isset($this->token['created'])) {
      return true;
    }

    // If the token is set to expire in the next 30 seconds.
    $expired = ($this->token['created']
        + ($this->token['expires_in'] - 30)) < time();

    return $expired;
  }
19988
def token_expired(self):
        """"""
        if self._token_timer is None:
            return True
        return timeutil.is_newer_than(self._token_timer, timeutil.ONE_HOUR)
947286
function isExpired()
	{
        eZDebug::writeDebug( 'Check expiration', __METHOD__ );

        // If passwordlifetime is not defined or 0 (zero, infinite lifetime) passwords never expire.
        if ( ( $this->attribute( 'passwordlifetime' ) == self::NOT_DEFINED ) ||
             ( $this->attribute( 'passwordlifetime' ) == 0 ) )
            return false;

        $passwordLastUpdated = $this->attribute( 'password_last_updated' );
        $actualPasswordlifetime = ceil( ( ( ( ( time() - $passwordLastUpdated ) / 60 ) / 60 ) / 24 ) );

        eZDebug::writeDebug( $passwordLastUpdated, __METHOD__ );
        eZDebug::writeDebug( $actualPasswordlifetime, __METHOD__ );

        if ( ( $actualPasswordlifetime > $this->attribute( 'passwordlifetime' ) ) ||
               $passwordLastUpdated == 0 ||
               $passwordLastUpdated == self::NOT_DEFINED )
        {
            return true;
        }

		return false;
	}
1057792
public function isAuthenticated()
	{
		$token = $this->getToken();

		if (!$token || !array_key_exists('access_token', $token))
		{
			return false;
		}
		elseif (array_key_exists('expires_in', $token) && $token['created'] + $token['expires_in'] < time() + 20)
		{
			return false;
		}
		else
		{
			return true;
		}
	}
982394
public function isAuthenticated()
    {
        if (parent::isAuthenticated()) {
            if (isset($this->token['access_token'])) {
                $expired = $this->isTokenExpired();
                //We err on the side of valid vs invalid, as the API will invalidate if we are wrong, which isn't harmful
                if ($expired === false || $expired === -1) {
                    return true;
                }
            }
        }
        return false;
    }
748671
protected function isTokenExpired( $service ) {
        if ( !$this->isTokenLoaded( $service ) ) {
            $this->tokens[$service] = $this->getToken( $service );
        }

        return $this->tokens[$service]->hasExpired();
    }
1166280
public boolean hasExpired()
    {
        if ( expiresAt == null ) {
            LOGGER.debug( "hasExpired - token is not expirable" );
            return false;
        }

        long now = System.currentTimeMillis();
        if ( LOGGER.isDebugEnabled() ) {
            LOGGER.debug( "hasExpired? - now: {} expiredAt: {} ", new Date( now ), expiresAt );
        }
        return now > expiresAt.getTime();
    }
837772
public function check($token)
    {
        $blacklistedToken = $this->model
            ->where('user_id', $this->Token->getSubject($token))
            ->where('expiry', '>', Carbon::now())
            ->whereToken($token)
            ->first();

        if ($blacklistedToken === null) {
            return true;
        }

        throw new BlacklistedTokenException();
    }
323664
public static function isPasswordResetTokenValid(int $expired, string $token = null): bool
    {
        if ($token === null) {
            return false;
        }
        $parts = explode('_', $token);
        $timestamp = (int)end($parts);
        return $timestamp + $expired >= time();
    }
1286618
private function isExpired($timestamp, $expiration)
    {
        $result = false;
        if ($expiration !== 0) {
            $timeDiff = time() - $timestamp;
            $result = ($timeDiff > $expiration) ? true : false;
        }

        return $result;
    }
901038
public function isAccessTokenExpired() {
    if (null == $this->token) {
      return true;
    }

    // If the token is set to expire in the next 30 seconds.
    $expired = ($this->token['created']
        + ($this->token['expires_in'] - 30)) < time();

    return $expired;
  }
1050331
public function isExpired()
    {
        if (null === $this->expiresIn) {
            return false;
        }

        return ($this->createdAt + $this->expiresIn - time()) < 30;
    }