It could be done with a custom creature animation that made it appear to sink into the ground gradually.
You'd probably want to script it so that the creature is unable to move.
The animation might end up with the creature totally submerged. The Frozen Animation technique could be used to keep the creature's head above the sand when so desired. The animation start segment might do the movement, with the main segment merely keeping the creature below the terrain, so that it can be applied "forever".
I'm not sure how you envisage the creature escaping from the quicksand, especially if their actions are frozen, but that might need a second animation. The first animation is likely to end in an untidy manner, with the creature suddenly popping up, or gradually rising, for no apparent reason.
Of course, the creature would actually still be standing on the walkmesh, albeit invisible, so you'd need to prevent combat and other giveaway activity.
Yeah, I meant a custom creature animation, actually. Maybe a new phenotype (one with shorter legs, ha ha)? '>
Oh, ok. Yeah that can be done. Sorry for the late reply, break from work now. Yeah, I would script them to not move and other things and yes it be a nice custom animation for a new phenotype, but that is a task for another time. I want to mess with some slimes and see about some interesting idea on emitters with them.