Upgrading from the 3400G is probably not worth it to a 3600. I would say 3700X at least.
I would probably just scrap the Lenovo board and chassis at this point.
The PSU is standard, so that could be re-used. The memory and storage as well.
You can pick up a new Micro ATX chassis and a B550 motherboard and then put in whatever CPU you want.
It is possible another Micro ATX board will fit in the Lenovo chassis. However, I am not 100% certain the backplate isn't customized to that specific board (you could just cut that part out and get a motherboard with a built in I/O shield.) Then you might have issues with wiring up the front panel...Not worth the hassle.
If you have the money, even consider selling the Lenovo entirely and building from scratch. You will thank yourself later.