h310m-hdv pc build

Solution
You can, but you'd be using an unlocked CPU on a motherboard that won't allow overclocking AND would have to buy a cooler too.

Perhaps an i5-8400 would be a better option?