UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ofUFOovmxo6BBIrUOakdfvEL7JxAKR6cDBvHTRCa/aQ=' 
WHERE 
  key_id = 'd088d12d6dd43e9b1b357cf3c476fbacb101e48b5c956dc1e40452bbf44b971e' 
  AND (
    token = 'ofUFOovmxo6BBIrUOakdfvEL7JxAKR6cDBvHTRCa/aQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036