Help with Arduino Uno code for controlling DC Worm gear moto

What does it do instead?

I notice that when you execute this line:

motorInterval = motorSleepInterval;

you do not also update the current time (previousMotorMillis). So the set interval can’t be correct.