Sounds like it's not so easy to achieve. I would start by looking into the code and search for the place when a ticket is opened. Then modify this place to include a simple if clause which checks if the ticket is locked and when it is locked, redirect the user back to the queue.
Not really a detailed help what to modify in the code, I know, but that's the point to start in my opinion. Since no one else (as far as I know) has requested the same, I doubt that there will be any solution on the forum, but just in case I remember not correctly, search is your friend ;) (if you have not already used it)