UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kZVBLYRv+sfstl7yPSFV3JmA3y6z4O5X10JOIlFUm3I=' 
WHERE 
  key_id = 'db75cf4894e68c6cea7d7fc9197bcec01517b7ad7aa900f1593eb8985c89d512' 
  AND (
    token = 'kZVBLYRv+sfstl7yPSFV3JmA3y6z4O5X10JOIlFUm3I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027