UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TJ4+E3GQqYiXCeLHWF9Oe2z/F5YCmLttzw4/br8g3cU=' 
WHERE 
  key_id = 'a4781427db43ab64551cb2c420a65a24ee6863ccf1d1e0b3abe91cef7897a0e6' 
  AND (
    token = 'TJ4+E3GQqYiXCeLHWF9Oe2z/F5YCmLttzw4/br8g3cU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022