UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eg53lafdykEboFDckAeuN6uWWTeGEUDLqQctPgHrW6Y=' 
WHERE 
  key_id = 'fc6d3d805cf3b6d3ccf74c102daf8ed49aa627d5f88e8992dbb38c0325d4d9f8' 
  AND (
    token = 'eg53lafdykEboFDckAeuN6uWWTeGEUDLqQctPgHrW6Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047