Determine if a door is locked - serverside

I need to determine if a door is locked, serverside but can’t figure out the best way to do it…

I have looked at using Entity.GetKeyValues but I have never tryed using it before and the page on it on the wiki says it often returns false data…

I have also thought of saving the data on each door if it is locked / not in a text file but really hate to have to put that much code into the little bit I am going to use it for, so does any one have any suggestions / can anyone verify that Entity.GetKeyValues will work in this case?