Is there a way to automate data toggle on Galaxy S7 (Edge)
30 hours probably isn't too bad, especially if you use your phone a lot.

If you're in an area where reception is poor, this will also have a negative effect on battery. 

There are apps on the Play Store ('Tasker' is one, 'Macrodroid' is another) that you can use to setup macros which perform certain tasks/functions based on the conditions you provide.

There may be a condition within one of those apps that state when the phone is locked, disable data. When unlock, enable it.