UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xApRHJbkwt/xb6XpBU5CAfaVw5dlTbhAt0JnIR80vEo=' 
WHERE 
  key_id = 'c403f95460da381a5e93b383b77f6218cd6178820b9edb5d6b04831f0df2c8b0' 
  AND (
    token = 'xApRHJbkwt/xb6XpBU5CAfaVw5dlTbhAt0JnIR80vEo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022