Just always lock the data table. You won't need two locks.