This sample implements a possible approach to handle concurrent updates on application data records, as described in the article How To Handle Concurrent Updates on Application Data Records.
As base reference, check the Handling Transactions documentation to better understand how the requests are processed.