You don't need to explain anything, nor do you need to wait for an opening. You can interrupt them – which you will have to do in order to take loving care of yourself. It might seem rude to you, but you need to consider that the over-talker is being rude to you, in taking at you instead of with you, and that he or she will likely find someone else who will be willing to listen for awhile.
If the person's feelings are hurt, that might be a motivation to ask you why you walked away.
I had this happen once at a gathering. The over-talker came up to me and asked me why I had walked away. Since she asked, I was honest. "You were talking at me on and on and there was no way to connect with you. I prefer a dialogue, not a monologue. It's boring to be talked at rather than talked with." She thanked me for being honest, telling me that she had often wondered why people sometimes walked away from her.
Not only was it loving for me to walk away, it was loving to her as well, since it motivated her to discover why some people were walking away from her.