Sounds a lot like an episode I watched on DVD a few months ago.
Buck Rogers in the 25th Century -- Season 1, Episode 9, "Unchained Woman." (Original air date: November 1, 1979.)
Buck is sent to break a woman out of a prison facility on Zeta Minor. They get out of the prison, but they still have to cross a desert to get to the nearest city. They are being pursued by an android prison guard (called "Hugo"), and at one point it catches up with Buck and the lady (played by Jamie Lee Curtis) and it seems to have the advantage in hand-to-hand combat (being stronger and feeling no pain probably helps) -- until, as you said, a large predator lurking under the surface of the sand manages to grab hold of the android when it steps on the wrong spot.
We later learn that the android survives and escapes the trap, after Buck and the lady have gotten a good head start -- probably because pulling an android down under a ton of sand does not cause it to quickly suffocate for lack of air, the way you or I might. Buck has to fight Hugo the android all over again, later.
Here's a picture of that android, looking somewhat the worse for wear after getting battered by various experiences. (But at the end of the episode, it was still "alive," just barely, and thus available for a comeback in some later episode, if the writers wanted to do it that way.)