UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UhUB+MMqR8sIALE85M4Yjzssz1rjs9fFg1Pn3a/lqIM=' 
WHERE 
  key_id = '72f39d5de95d3aff87f35420fd47dd9789651754a5941e1d4c993cc5cea5731d' 
  AND (
    token = 'UhUB+MMqR8sIALE85M4Yjzssz1rjs9fFg1Pn3a/lqIM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038