Below I'll explain how I've replicated racing condition. Feel free to use other preferred method if needed.
# in Admin Console:
* create a tangible product
# in PhpStorm
* enable debugger
* make sure that parallel debug is enabled (see <image_here>)
* put breakpoint on the line where `LOCK ...` statement is in changed code
# on Front-End
# open 2 browser tabs (one normal and one private so that cookies are not shared)
# in each tab:
* go to category category where product as added
* enable Xdebug
* press `Buy Now` button
# confirm, that 2 debug connections were created in PhpStorm
# allow the `LOCK ...` sql to be executed in 1st debug session
# allow the `LOCK ...` sql to be executed in 2nd debug session
# confirm, that in 2nd debug session debugging is impossible due attempt of lock tables, that are already locked
# let code from both debug sessions be executed till the end
# confirm, that:
* both created orders have different `Number` column value
* the value of `Comm_Next_Order_Number` system setting (in {nav Configuration > E-commerce > General} section) has next available order number (+1 then last used one)