UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'v49TJHMw4NKPYIgyWwKutMHkFcNN89Z1Z5Jm2NRG6HU=' 
WHERE 
  key_id = '260d5e72235e444c93159f5ce27dab6408376bd1d89db803ab7f4bd72eb59bda' 
  AND (
    token = 'v49TJHMw4NKPYIgyWwKutMHkFcNN89Z1Z5Jm2NRG6HU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044