[Fix] Allow multi-thread processing of temp tables

[Add] Transactions/row locking for temp tables that are being updated