UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'n/za1W3w6PFQwv2PXsQ6Fj/775AMZdR5tazXR7faWTs=' 
WHERE 
  key_id = '0404d7bf87c7d660ecb1b31a4a269f66e91841a2a5e0906f2437e5d1649bf4d8' 
  AND (
    token = 'n/za1W3w6PFQwv2PXsQ6Fj/775AMZdR5tazXR7faWTs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046