If you are lucky you may have cellular data enabled and date and time set to change automatically.
In result you should be able to use an activated working sim card with or without mobile data to syncrhonize the date and time and fix the locked for 45 years issue.
This usually occurs when the battery has been flat for a long time or was unplugged resetting the time on the phone to 1/1/1980 which is the system default time.
Otherwise if you can't get the date and time synced then unfortunately you will need to restore the phone through iTunes.
To restore the phone via iTunes you simply switch the phone off, hold the home button and plug the iPhone usb cable to the computer to the phone.
Keep holding the home button until you get the iTunes logo.
Then open up iTunes and click restore.
Depending on how long it takes to download the firmware to restore the phone the phone may kick itself out of recovery mode and then you will need to put the phone back in recovery mode again using the above steps before the download finishes to ensure the restore is perform successfully when the download finishes.
You will most likely need to enter your Apple ID and password linked to the phone during the setup activation stage after completing the restore of your iPhone.