If she's trying to deal with and your husband refuses to do his part in handling his family (which is lazy and cowardly and very childish), then the only answer is to limit your time accordingly, and politely say "no, not gonna deal with your shit."
If you know she is going to talk about herself constantly, then take a book or podcast or something to amuse yourself for the duration of the visit, do the basic 15 minutes of "catching up" since last time, then excuse yourself to go to the bathroom, check something in the car, or whatever and when you come back, get your book/earbuds and tell them you're going to let your husband and her chat and you're just fine by yourself.
But really, you have a husband problem, not an in law problem. You can't change your inlaws, but your husband should be dealing with this shit, and if he won't, then he's the problem here... and this is bad for a marriage long-term. Having a passive husband that won't step up when you need help because he's too timid or avoidant... you have no idea how terrible that feels and it could end a marriage if he's so passive that he basically refuses to help out when the chips are down.
So if it's his mother, then his problem. He gets to be her audience for the next 3+ hours. "Hey honey, I'm gonna go get some stuff from the car/next room, but you and your mom can go ahead without me and chat away! Have fun!"
And if you want to leave after 2 hours, then stand up, announce to them that it's time for y'all to get home and thank them for a lovely visit and gather up your shit (and your husband) and leave.
But the big thing is that you don't have to go as often, or stay as long if you don't feel comfortable doing so. Your husband isn't "non confrontational" - he is a wimpy little child boy who hasn't learned to relate to his mother as a peer - adult to adult. He's still allowing her to call the shots, and treat him (and you) as if you were still children. He doesn't have to stand up and scream at her to get it across that the dynamics need to shift, but he should be telling his mother "hey mom, you've spent the last hour talking about yourself. So how about you ask 2microsNH about her job? She just had this really cool thing happen and I'm really proud of her." and then redirecting his mom if she starts back on the one trick pony routine "hey mom, I think we've heard enough about your thoughts on this subject. How about I tell you how I'm doing with this new hobby thing for a while?" and then refuse to let her hijack the conversation back onto her favorite subject. But since he won't, you need to. Otherwise you're trapped in a limbo of dealing with this shit and then it will lead you to start resenting your husband for being so passive and abandoning you to deal with HIS shit... not a great recipe for success in a relationship.
Although I'd put my foot down about spending that much time if you truly are tired of it. You don't have to be there every time. Hell, I have an extremely self-centered MIL, and I stopped going to visit with the husband many years ago due to her incessant bullshit. He stopped going too, once he didn't have me as a buffer - interesting, right? He even cut her off for years because she was a bit of a bitch.
At this point, I don't deal with assholes, black holes (this type of person that sucks the life and craves every bit of attention) or any other types that are draining or treat me poorly. Even if they're family. ESPECIALLY IF THEY ARE FAMILY.
You are allowed to cut out of visits, to leave early, to go amuse yourself after making a small amount of small talk... just because you're female, it seems expected that we're supposed to be the ones smoothing things over, doing the listening/gossiping/dealing with the family (even when it is the inlaws) while the menfolk were allowed to take off and watch TV, go to the back porch or garage and tinker or take a nap... fuck that noise. It is possible to develop a polite spine where you say "thanks but no" to the expectations for your interactions. As long as you're not being a bitch, you can excuse yourself and go do something else any time.
You didn't buy a ticket to watch your MIL's one woman performance, and you sure as hell aren't being paid enough to sit through another momalogue so any time you feel like ditching, just excuse yourself and GO.