How to write OP_CHECKMULTISIG for the following 1-of-2 multisig P2SH script
From what I understand from your question (correct me if I'm wrong), you want to have a script that in the OP_IF part pays to 1-of-2 public keys. You could try the below script:

OP_IF
  OP_SHA256
  OP_DATA (0x20)
  &lt;hash of secret&gt;
  OP_EQUALVERIFY
  OP_1 
  OP_DATA (0x21) 
  &lt;pubKey of swap1&gt;
  OP_DATA (0x21)
  &lt;pubkey of swap2&gt;
  OP_2
  OP_CHECKMULTISIG
OP_ELSE
  OP_DATA (size of relative_locktime)
  &lt;relative locktime&gt;
  OP_CHECKSEQUENCEVERIFY
  OP_DROP
  OP_DATA (0x21)
  &lt;pubKey of refund&gt;
  OP_CHECKSIG
OP_ENDIF


You could spend this script with: &lt;0&gt; &lt;sig1&gt; &lt;secret&gt; 1