Intelligent in-motion locking