While a detail strip will remove all the sand, it may not be necessary.
1. Make sure the pistol is unloaded, have someone else check behind you on this.
2. Field strip the piece, separating the parts of the slide assembly: recoil spring, barrel and slide.
3. Clean the parts of the slide assembly. If necessary, pull the striker and clean it and the striker tunnel (probably not necessary).
4. Take the pistol frame and slosh it around in a bucket of hot soapy water until you don't feel grit when you stroke the trigger. Let the frame assembly dry, lubricate as necessary (WD-40 will drive out any remaining water, but isn't a suitable firearms lubricant.)
If you know someone with an air compressor, blowing the sand out of the frame with air is OK if you wear suitable eye protection. Be absolutely sure you don't disturb the fiber plug in the trigger return spring. You'll see the spring attached to the back of the trigger.
5. Properly lubricate all parts and reassemble.