Zend certified PHP/Magento developer

Magento 2.3 :: Does checkout handles concurrent requests?

Magento version: 2.3.1

We do flash sale for a particular product on our website on fixed date and time.

The product quantity is limited.

A lot of customers try to purchase the product at the same time.

We end up overselling the product.

My suspicion is Magento do not handle thread safety and thus concurrent requests are allowed to purchase the product.

For example, last quantity is remaining and two requests were received at the same time (this is a normal scenario in flash sales).

Then, will the method: $stockItem->getIsInStock() return true for both?