Possible Resource issue between custom .net dll and core CRM

I have a custom .net dll that writes to the Company, Account and some of the link tables including AddressLink. When I run the custom dll from a button inside CRM, CRM hangs. I checked the CRM system log file and found the following error:

SQL Error : Query timeout expired (UPDATE Account SET Acc_Balance_CID = Acc_CurrencyID, Acc_CreditLimit_CID = Acc_CurrencyID, acc_website = '' WHERE

I traced this error to the PostInsert method of the table level script TLS_HideAccount_Company in the Account entity.

Is there a way to close the connection and release any lock, for example, by calling the dispose method of the Record class?

Alternatively, Is there a way to bypass the table level script when records are created via my custom dll?