UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'khln7DwBpOu7yqnRgNdS1fW0eT8OV9Zjp5rUOA7fyd0=' 
WHERE 
  key_id = '10600c731bfbac8068cb511339654d6ee213d3d1065e58e5a19e167cfeb53196' 
  AND (
    token = 'khln7DwBpOu7yqnRgNdS1fW0eT8OV9Zjp5rUOA7fyd0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046