When it comes to these types of coworker relationships, I’m often free to listen to whatever they want or have to say despite the fact I don’t have a habit of talking myself.
That being said, if said coworker is becoming a complete distraction, I would definitely tell them we can continue the discussion on break but not at the moment when I’m busy doing the task at hand. I don’t wish to shut them down completely because that tends to sour relationships hard.