If this is a web app, then a trigger is probably not the way to go. Web apps are request driven, so even if the data changes there is no way to push that change out a client.
From a web app, your only real route would be to poll the table to watch for changes. You could do this in the background using AJAX.
That aside, if this were my task, I'd ask the person who set it to explain why pessimistic locking is required in a web app in the first place. Its usually considered bad practice; web apps and RBDMSs are by their nature designed to support multiple concurrent users. Once you add pessimistic locking to the mix that behaviour goes. A better way might be some sort of weighted optimistic locking
pattern, where those users in the admin role "win" when there is a version mismatch?