Disconnect a specific tunnel on screen lock

I have an incredibly sensitive ssh tunnel which I want to automatically disconnect from when I lock my machine (or close the lid).
If I paid for premium would I be able to achieve this using automator?

Does core tunnel also support 2FA (https://www.digitalocean.com/community/tutorials/how-to-set-up-multi-factor-authentication-for-ssh-on-ubuntu-16-04)?

Thanks

If I paid for premium would I be able to achieve this using automator?

Premium features including AppleScript support, so yes you can.

Does core tunnel also support 2FA

Core Tunnel supports all kinds of authentication methods that OpenSSH supports, including 2FA. You can do a test on Basic version without pay Premium.