This is probably not possible.
First, let's assume you can access the internals of your AIO. The processor must be socketed (not soldered onto the motherboard).
Next, you will have to check with Lenovo to find what processors are supported by THEIR BIOS.
Then, you can select from those processors.
Now, the graphics card. Assuming the AIO has one, you can then find another. But, I am going to assume the graphics are provided by the processor and there is no graphics card.
However, if the graphics are provided by a card that is removable and replaceable, then just get another card that can be used.
Do you know what your current CPU model number is, and what graphics you have?