Common sense dictates you shouldn't put your camera on the sand in the first place.
Static electricity makes sure sand will get into the innards of your camera if you place it anywhere near the sand. The best way to keep sand off the camera is to keep the camera hanging around your neck while you stand or set the camera on a tripod.
There's nothing more you can do. Throw away your camera then buy a new one. It's cheaper that way.
Now you know!