Hi @gmgj,
I believe Certbot already uses lock files to prevent multiple instances from running. See the "Lock Files" section of the documentation.
When processing a validation Certbot writes a number of lock files on your system to prevent multiple instances from overwriting each other’s changes. This means that by default two instances of Certbot will not be able to run in parallel.