Hello,
In your case, you could simply create two configuration profiles on the router (from "System -> Profiles" menu) and then switch between them when necessary. One profile could have disabled Mobile (3G/4G) connection (by either having incorrect APN set up, or have Mobile interface not enabled in "Network -> WAN" menu), while another one could be without any restrictions.
Then you could configure Digital input rule in "Services -> Input/Output -> Input" menu, so that router would switch its configuration profile once input is activated:
You could also create another rule, so that router switch to another profile once input is no longer active.
You would also be able to switch these profiles via SMS messages using "<router's password> pr <profile name>" SMS command, example: "admin01 pr profile1". However, take note, that depending on your configuration, digital input might interfere and switch profile back to the main one. To avoid that, you could use "admin01 mobileoff" / "admin01 mobileon" SMS commands instead to disable/enable mobile data connections.