Throw TransactionTimedOutException in case of a transaction processing time out

Related to #3830, details are there.