I would move the data constraints into the database, as that will automatically deal with any concurrency issues.
Note that you will face two issues when moving checks into the database:
- It becomes impossible for invalid configurations to exist. This means that that "unknown" data or "data we know is false but will be corrected later on" will not be able to be saved in the database. This can annoy your users or disrupt their workflow.
- Migration of invalid data to the new constraints will require some corrections to the database.