delete from some_table where some_column = :someValue and (some_other_column is null or some_other_column = :someOtherValue)
should work