An upscaled rate law for magnesite dissolution in heterogeneous porous media