If you don't use SQL for this you'll need to reimplement your external locking for this, even though databases already implement it.
But, that "external" part is what trips up a lot of people. Few things are confined to only exist within the database. Such that sometimes you can't do locks that accurately portray what we can order outside of the computer system. Think legal clawbacks and the like.