Hi,
Kindly help me to know how to lock a ticket so that other staff members cannot close the ticket. but still be able to reply on that ticket.
You can't.
If someone clicks on a ticket it becomes locked for a small period of time. This prevents anyone from adding new comments, and/or closing the ticket OTHER THAN THE PERSON THAT HAS IT LOCKED.