UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SxxH2KNGKb7KM0W7wL1kzC1aBP2EckmJp4t+GQfRgaI=' 
WHERE 
  key_id = '03dac787a9d1359fca61ee6b147de1fc8df908d08d2e42aa01b0f79a2397497b' 
  AND (
    token = 'SxxH2KNGKb7KM0W7wL1kzC1aBP2EckmJp4t+GQfRgaI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00060