This sounds to me like a database replication problem. Which is a classic problem whenever you have two pieces of software (in this case, two versions of the web page) managing two different databases, but with a requirement that both databases should be updated identically. Synchronising those updates is a tricky problem in database management, especially if there are thousands of instances of the updating software all sending requests to the database servers.
Table level locking to prevent simultaneous write accesses to a database table, whilst the simplest scheme to implement, has a habit of triggering such replication issues if measures are not taken to ensure that all write accesses are indeed performed. Record level locking (or row level locking) is harder to implement, and requires more work on the part of the programmer in some other areas, but avoids the replication issue unless, for some reason, the conflict arises because of an attempt by two different database accessors to write to the same record (which, if it happens, is frequently a pointer to bad design from the beginning).
Modern SQL database management systems support a solution to this problem, in the form of a transaction. Which is a well-defined block of read and write requests, carefully arranged to be in synchrony, with built in error detection. If an error is detected, the entire transaction is rolled back, and none of the reads and writes are actually committed, so the database remains unchanged until the error condition is eliminated. On the other hand, if all goes well, then the transaction is committed, and the sequence of reads and writes is duly performed as intended, but in a manner that ensures those reads and writes are performed as an atomic (indivisible) operation, so nothing else buts in and interferes with the transaction. Since this forum uses PHP as the underlying programming language, and MySQL as the database manager, then transactions are available to solve the problem, provided the database is in InnoDB format, and uses the InnoDB database engine. Most sensible large-scale applications using MySQL, or applications intended to be scalable in the future, use InnoDB and its built in transactions feature.