The following code snippet demonstrates the use of Doctrine's pessimistic offline locking capabilities.