There is no polite way to tell someone to be quiet when you're not arguing. Best way to do it is when you get a chance to talk. Cut yourself off and then possibly looking at your watch look 'suprised' and then say "Oh, I have a previous engagement to tend to, I'm a bit late. Let's talk later" Obviously not in one whole sitting or they'll know you're itching to escape. Let me make a scenario...
Trap:"So then Jill said to me that she wanted the dress but I was like oh mmm I dunno what do you think?"
You:"Oh yeah I think that dress would be nice.. oh my.. the time!"
Trap:"What's wrong?"
You:"I have a previous engagement! (I planned to meet...) and I'm running late!"
Trap:"Oh I'm sorry, didn't mean to hold you up."
You:"No it's ok, I'm sorry, I didn'tplan well."
Trap:"Ok, bye"
You:"I'll talk to you later, and about the dress too!"
It is rude to look at your wristwatch when someone is talking to you but if you casually make a pass on your watch as you're talking it should be less offensive.
Along those lines? ^^
Looking at the first two comments if you mean for them to be quiet whilst you're intending to stay... I agree with them but as for old people.. it's harder.
As for chpri's "Hush, please!" That's rude!