UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8xURo4lQ1pQtxRmd6azMM56q7CXbKf4Hf1mxoQqaBTM=' 
WHERE 
  key_id = '94a274cf4f70630fb499cce2ffa5bf8b4888a739a7b95c2e5f1dba1066b1e028' 
  AND (
    token = '8xURo4lQ1pQtxRmd6azMM56q7CXbKf4Hf1mxoQqaBTM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032