UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DA21eBLcXH+rcu8H05P3UrOEzi6cPcGZdTZfFkvZHCw=' 
WHERE 
  key_id = 'afceb6ca10d290e5351f274987c757cbe1c5ff4f30d934c1200242b4b7f48ffb' 
  AND (
    token = 'DA21eBLcXH+rcu8H05P3UrOEzi6cPcGZdTZfFkvZHCw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028