All security scanning applications (should) place a lock on the file it is scanning.
The reason behind it is really simple.

Example:
Let’s say you have a clean file that is 50 Mb.
avast starts scanning and have done the first 20 Mb.
You change something within the first 20 Mb.
That means avast should start scanning again from the beginning.
If it doesn’t do that, you could enter malicious code within the first 20 Mb and avast will show the file is save.
That is ofcourse not what we want and would make avast (or another scanner) useless.