Volunteers from the Royal National Lifeboat Institution (RNLI) saved a person who was trapped in sinking sand just in the nick of time.