UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IKp2j8axY/RsKpRJ/MmORBHSfm/BEranqFBPMMazstQ=' 
WHERE 
  key_id = '67373ab85dfdf4e781a5ea0f996e1e522d690d64eedf70bdb983ab592c3ae973' 
  AND (
    token = 'IKp2j8axY/RsKpRJ/MmORBHSfm/BEranqFBPMMazstQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034