Temporary table for new PayloadId is removed

Output to table variable is replaced with output to Messages table. Now @NewPaymentId is filled within UPDATE statement. No need for explicit transaction.