UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'u/NvKCT+cx1hmeTnJSli5BLnrK2mJaW7d/ac6dGQjIE=' 
WHERE 
  key_id = '337998171910a96f50f7a5a8976b0279d75a165f582816a705ae9ec62ea55dbd' 
  AND (
    token = 'u/NvKCT+cx1hmeTnJSli5BLnrK2mJaW7d/ac6dGQjIE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030