Validate uniqueness constraints for new data.

Support concurrent updates of data affected by the constraints.
Acquire locks to ensure mutual exclusion.