Support more complex logic for template locking
When importing a template, its lock is based on :lock option we pass to importing method. This implies we know whether we want to lock/unlock a template, but does not support more advanced logic based on template itself. For example, we may not want to change the locks for existing templates and keep them as they are. This is not possible at the moment.