After reviewing your post, it sounds like you tried to erase the iPhone and it is now saying the SIM is not supported and is also locked. One reason it may say SIM is not supported can happen is if you are trying to switch to a different carrier SIM card. There are a couple things you can try that may be able to help. I would recommend you read these articles and use them to help troubleshoot the issue.
How to unlock your iPhone for use with a different carrier
If you forgot the passcode for your iPhone, iPad, or iPod touch, or your device is disabled
Thank you for using Apple Support Communities. Have a nice day.