UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vT5xYML6Rpm4f8V2I6arCio5d6V0SyITrrY7OxA7dgg=' 
WHERE 
  key_id = '2dd2056af13b4f6be42f760597de4ee481dbbf43fc3ca13a381b9baf70b907c3' 
  AND (
    token = 'vT5xYML6Rpm4f8V2I6arCio5d6V0SyITrrY7OxA7dgg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034