Helllooooo to you.
I do hope your sedan is feeling fine.
You don't mention if the folding mechnism ever stops, or just keeps driving.
You don't mention if both sides are the same.
Possible solution; the mirrors have been folded by hand, so that they are not aligned to the motor, and so when they open, they go too far.
Check; deploy the mirrors, then ensure that both are in teh normal position, which you will find has a detent position.
Then try folding them; they should fold as required.
Then try opening them again; if this was the probelm, they shoudlo open to the correct position.
Then use the electric mirror adjustment motors to adjust the miror within the mirror housing, so that you get the view of the road behind that you want.
If this does not, tell us about motor operation, stop positions (closed and open) and anything else that you fel might be useful to know.
Happy mirror fixing!