UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RkbriqBs9D8zgdUQM3FDA4oMo/y/XqGpWSGZ3B/OdTs=' 
WHERE 
  key_id = 'f010153f49007ec50ccc895e09f1f475452ea5b47b48aae2b199e8738437b483' 
  AND (
    token = 'RkbriqBs9D8zgdUQM3FDA4oMo/y/XqGpWSGZ3B/OdTs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021