Commit a transaction