to overclock you need to have a bios option to change multiplier of -k cpu (which has unlocked multiplier). Dell optiplex bios is restrictive without this option because this is a business class model. If you put same i7-7700k cpu in Dell Aurora R6 then you can overclock because it is a gaming pc line with bios and AWCC written to help user OC. In addition pc hardware needs high performance heatsink and fans to cope with high power high heat from OC. Optiplex heatsink and case is not designed to do it.  If You put a muscle car V8 engine in Corolla it is not going to work with the rest of components. bios is essential machine level code to help user manipulate cpu voltage etc during OC, it cares more about cpu engineering operation than Windows which is high level code and relatively independent of cpu spec.  both new and old -k cpu work, just old one has no record of mileage.
So I recently bought a Dell optiplex 7050 MT. It came with i-5 7600 processor. . I'm hoping to hear that I can upgrade to a i7 9700k. Both of them are LGA 1151 socket. I'm not sure if that means it's going to fit or not.  
Optiplex 7050 MT CPU upgrade