Using transaction with concurrency