UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hTLeX/y3Z9FhoPS7DBs01tVulPdLKVIcgQwnQyn/gFk=' 
WHERE 
  key_id = 'c2f9b752ca5fa33d00544dd639bf439f81baa5436ddf4ff076768df894096b9f' 
  AND (
    token = 'hTLeX/y3Z9FhoPS7DBs01tVulPdLKVIcgQwnQyn/gFk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054