You can configure the Moto Smart Actions on the D4, it's pre-loaded and works.
I looked quickly and there is a trigger for display/screen off, and an action to disable background data/sync and one to disable cellular data. You could configure that and then another rule to turn them back on when the display is on.
Not sure if that is what you mean by 'locked' though...