If another transaction retrieves the data and sees that the flag is set by some other user, then it will, by convention, give a warning message to the user that the data is in use.
For example, a J2EE transaction could be set to retrieve a message from a JMS provider, extract data from that message, and then attempt to update the database.