Your age doesnt tell us anything about how noob you are
Unexpected end of file, means you have missed to close these "" or () or { }
Is this you full scripts? I don't think it is since you don't have an OnEnter() and OnLeave()
Could you post the whole scripts.. Nothing looks wrong with your script here except:
PlaySoundAtEntity("", "unlock_door.snt", "
unlock", 0, false); did you call your door "unlock"? if not, then this should be changed to the door name
And you might want to put this into void OnStart()
AddUseItemCallback("", "Key", "unlock", "unlockdoor", true); The "unlock" is your doorname. If this is not your doorname, change it.
Trying is the first step to success.