UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TaXHQF5Gnue/ilkEOoEZkNBI2fy9rVYQcX9fha05yrs=' 
WHERE 
  key_id = '82385488fa2cdcd767d42a1c7c1f3172d44da649c3db57b898a44404869b6986' 
  AND (
    token = 'TaXHQF5Gnue/ilkEOoEZkNBI2fy9rVYQcX9fha05yrs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016