code: public function purgeOptInTokens()
  	{
  		/** @var OptIn $optIn */
  		$optIn = System::getContainer()->get('contao.opt-in');
  		$optIn->purgeTokens();
  
  		// Add a log entry
  		$this->log('Purged the expired double opt-in tokens', __METHOD__, TL_CRON);
  	}
docs: Purge opt-in tokens