Composer, composer.lock not in sync

In case of: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies.

composer update --lock