Yes, 4ice is right!
I have not tested this, but the ticket will gain a lock on activity. That means when an user opens the ticket the lock is set. If the user is then doing nothing (typing is not detected as well off course) for 5 minutes, I guess the ticket will be unlocked after 2 minutes. But you can test this by opening the site in two browsers and see what happens.
I have tested, and 4ice is exactly right!
If a Staff (Staff A) starts to view a ticket, then he/she will gain a lock for 2 minutes (based on the case above) counted since the ticket was being displayed. If another staff (Staff B) is trying to view this ticket during this 2 minutes, then Staff B will get a warning message: "Unable to obtain a lock on the ticket" and also an error message: "This ticket is currently locked by another staff member" all at once.
Then after that 2 minutes is over, the lock-time will automatically expire, even its lock record in ticket_lock table is still in there and Staff A is still viewing that ticket. Therefore, if Staff B starts to view the ticket after that 2 minutes while Staff A still viewing that ticket also, then Staff B will create another new lock for the next 2 minutes (this will update its lock record in ticket_lock table), and so on.
And thanks to webPragmatist for the MOD at:
http://www.osticket.com/forums/showthread.php?t=1066(http://www.osticket.com/forums/showthread.php?t=1066)
for unlock the locked ticket.
I think it needs an option from Admin Panel to grant "Unlock The Locked Ticket" permission to the specific user-groups (i.e: something like: Only Admin and or Manager can unlock the locked-ticket). ;)
I've just got a new lesson from this, and that's why I share this to you. Hope this is helpful.
Best regards,
Masino Sinaga