How you run the SQL?
SQL itself has no timeout, so what you describe as a problem is not possible.
The timeout is always handled on the connection level / connecting application. SQL Server is happy having SQL calls that last for hours or days.
So, unless you do sometihing "funny" / unusual the queries within the SP will not time out - the connection that calls the procedure will time out and thus rollback the transaction.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…