Fixed database query of existing locks & added JSONParser returns null for no connection
Checks db for existing lock before attempting connection