Should be fine. CL17 is better than CL22 so it'll have no problem running at CL22. CL means CAS Latency, bigger number means more delay means slower. The memory will be ready to give the CPU the data in 17 cycles, but the CPU will wait 22 cycles before it reads it, wasting 5 cycles. Having slower RAM with a higher CL than the motherboard/CPU will usually result in the motherboard matching the CL of the stick, so the system will run a bit slower than it could because it has to wait a little bit longer for memory operations. In both cases it should work fine. Both can vary the speed within some range so exact values aren't that big of a deal. I believe the RAM in my system can do much faster than my CPU supports.
The sticks have metadata on them that the system reads on startup, so it's all autodetected. On desktop motherboards it's usually configurable in the overclocking menu as well to override the settings to custom values. I've never heard of a system that can only do one hardcoded CL value, but if such a system would exist then having faster RAM should work but slower RAM would end up overclocked and possibly unstable or non-functional at all.
Computers are not specified for a specific RAM latency (the number in CLXX describes the latency of the RAM), you can put whatever you want.
Just note that in the case that you add a second stick of RAM and that the latencies are mismatched, the computer will pick the slowest of the two (in your case, CL22, so that won't change anything latency-wise)