The expression is normally "if and when....", but "if or when" is also OK. The word "only" often appears before "if", to give added emphasis.
Here is an example:
"I will help him with his English only if and when he starts to study it seriously."
The "if" expresses my condition. The "when" tells him that I won't help him until the time when he starts studying English.
You don't really need both "if" and "when" to express the idea, but doing so adds emphasis and seriousness to your statement.