UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MB3fx+NmLUMLSQ/ZxqwTcArhHea3n/e6mve7B6qB5co=' 
WHERE 
  key_id = '6f67f5d203ac3f61b2e384ad5e6ff698fb9fcc2433064c4d108cba2406f28337' 
  AND (
    token = 'MB3fx+NmLUMLSQ/ZxqwTcArhHea3n/e6mve7B6qB5co=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015