@tomekmak You need to use BIOS F5b or F5c - you mentioned F5a earlier and it does not support base clock overclocking.
You can download F5b or F5c BIOS from this thread:
[OFFER] Skylake Non-k OC BIOS Archive
I have also included a guide in the second post for overclocking on Z170 Gigabyte boards.