
Before you bolt, go into interview mode. Ask the other person's favourite band, best part of their job, weirdest childhood fear -- anything to bring out inner coolness. You may turn that conversation into one you want to be in.
If you just want to escape, a short-and-sweet "nice talking to you" works best. You don’t need to make up a lie. You could get caught out or, worse, have the person tag along with you.
If you feel like you need a reason to leave, just say you want to say hello to a friend or get another drink. To make the excuse more believable, go do what you said you were going to. And if you run into that person again, just smile and keep moving.