Delete expired tokens.

@return void
491635
public function deleteExpired()
    {
        $expiredAt = Carbon::now()->subSeconds($this->expires);

        $this->getTable()
             ->delete($this->table)
             ->where('created_at < :expiredAt')
             ->setParameter('expiredAt', $expiredAt)
             ->execute();
    }
605354
public function cleanExpiredTokens($expiryTime)
    {
        foreach (glob($this->path.DIRECTORY_SEPARATOR."*".$this->suffix) as $file) {
            if (filemtime($file) < $expiryTime) {
                unlink($file);
            }
        }
    }
1097902
public function delete()
    {

        // Cleanup the user
        $this->login_history()->delete();
        $this->affiliations()->detach();
        $this->refresh_token()->forceDelete();

        $this->settings()->delete();

        return parent::delete();
    }
984326
public function clearSessionTokens()
    {
        $this->session->remove(self::SESSION_TOKEN_KEY);
        $this->session->remove(self::SESSION_TOKEN_SECRET_KEY);
    }
76469
public function deleteExpired()
    {
        $expired = Carbon::now()->subSeconds($this->expires);

        $this->makeDelete()
                ->where('o.createdAt < :expired')
                ->setParameter('expired', $expired)
                ->getQuery()
                ->execute();
    }
125350
def delete_expired(self, expires):
        """"""
        meta = self.model._meta
        with commit_on_success():
            self.get_all_expired(expires).update(hidden=True)
            cursor = self.connection_for_write().cursor()
            cursor.execute(
                'DELETE FROM {0.db_table} WHERE hidden=%s'.format(meta),
                (True, ),
            )
613817
protected function tokenExpired($token)
    {
        $expirationTime = strtotime($token['created_at']) + $this->expires;
        return $expirationTime < $this->getCurrentTime();
    }
238152
public function expired()
    {
        // Update if empty
        if (empty($this->entries)) {
            return true;
        }

        // Check timestamps
        if ($this->timestampManager) {
            return $this->timestampManager->check($this->getTimestamp());
        }

        return false;
    }
889396
public function clear()
    {
        $now = Carbon::now('UTC');

        ORM::for_table('files_downloads')
            ->where_lt('created_at', $now->subHours(SettingsFile::TOKENS_OLDER_THAN_HOURS))
            ->delete_many();
    }
528821
protected function purgeOldCodesFromDatabase()
    {
        if ($this->use_database && $this->pdo_conn) {
            $now   = time();
            $limit = (!is_numeric($this->expiry_time) || $this->expiry_time < 1) ? 86400 : $this->expiry_time;

            $query = sprintf("DELETE FROM %s WHERE %s - created > %s",
                             $this->database_table,
                             $now,
                             $this->pdo_conn->quote("$limit", PDO::PARAM_INT));

            $result = $this->pdo_conn->query($query);
        }
    }
631667
public function clear()
    {
        $currentDate = new DateTime();
        foreach (\array_keys(self::$registry) as $key) {
            $this->clearExpiredKey($key, $currentDate);
        }
    }
956709
public function cleanUpUnassignedTokens(array $tokens)
    {
        $this->em->clear();
        foreach ($tokens as $token) {
            $token = $this->em->merge($token);
            $this->em->remove($token);
        }

        $this->em->flush();
    }
840097
public void purge() {
        long time = System.currentTimeMillis();
        if (time - latestWriteTime > expireMillis) {
            // Everything in the map is expired, clear all at once
            map.clear();
        } else {
            // Iterate and remove until the first non-expired token
            Iterator<Value> values = map.values().iterator();
            while (values.hasNext()) {
                if (time >= values.next().expire) {
                    values.remove();
                } else {
                    break;
                }
            }
        }
    }
319046
public function delete()
	{
		\DB::delete('users_groups')
			->where('group_id', '=', $this->pk())
			->execute($this->_db);

		return parent::delete();
	}
932057
public function clearExpire()
	{
		$tableName = $this->cache->parseField($this->tableName);
		$expireField = $this->cache->parseField('expire');
		$time = time();
		return $this->cache->execute(<<<SQL
delete from {$tableName} where {$expireField} <> 0 and {$expireField} < {$time}
SQL
);
	}
800138
public function deleteAuthItems() {
        foreach($this->privileges as $privilege) {
            $this->delete(
                'AuthItem',"name = '".$privilege.'::'.$this->getController()."'"
            );
        }
    }
539943
public function expireToken($token)
    {
        $tokenData = $this->getTokenData($token);
        if ($tokenData == false) {
            return false;
        }

        $tokenData->date_of_expiry = time() - 1;
        return $tokenData->save();
    }