UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xe/gXOl4wYUCaq3M/YDNZ96dEzGFrlLusbYoYTUlA24=' 
WHERE 
  key_id = '553ada65823c4599a6f11b941d9a74bde939ae4a6dca340ff1f5dff57b5ab8e0' 
  AND (
    token = 'xe/gXOl4wYUCaq3M/YDNZ96dEzGFrlLusbYoYTUlA24=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015