How to solve it when the iPhone is going to be locked for 48 years?
This is very unlikely a security issue. This insane amount of minutes message is usually due to the iPhone clock being reset. You should be able to solve it by rebooting the phone (might need to do it a couple of times) with a working SIM card in that has data. When the phone boots it should sync the time and unlock everything.