Taken from TNE : "Sandcasters fires cannisters of magnetic ablative crystals. Each sandcaster contains a generator which creates an electromagnetic fiels which manipulates the location and shape of the cloud of crystals. These clouds are placed in the path of incoming beam weapons, and cause the beam weapon to expend its energy burning through the cloud. The sandcaster operator uses laser warning sensors installed in the sandcaster to detect fire control locks and anticipate incoming beam fire."
In my mind, the 'sand' stays near the ship and is placed/kept between the ship and it's opponent. It's like a small shield that you need to move to intercept the attack (and you need to estimate or predict where you'll need it). Once hit by a beam wepon, the gunner needs to renew the sand cloud (use a cannister) as the previous one has been burned through.
I may be wrong, it may be far from real world physics, but for me it works well enough. AFAIK, real world physics (as we understand it right now) doesn't really allow us to build MgT kind of laser weapons.