UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vTAyuwsx/+aA75ows2YMovR40UtSHWcaKCAbXTDrKIs=' 
WHERE 
  key_id = 'cd1e73a94d60844fdcd2956f586ac96fc0c9740b9ffa2ebc2de5a6bea0cb2cf2' 
  AND (
    token = 'vTAyuwsx/+aA75ows2YMovR40UtSHWcaKCAbXTDrKIs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029