Data Warehouse -- Generating natural keys to be used in WHERE clauses
Just use composite keys. If the table's natural key is (user_id, branch_id), use that.

CREATE TABLE whatever
(
    user_id ....,
    branch_id ...,
    PRIMARY KEY(user_id, branch_id);
);


In joins you can do it like you showed:

SELECT ...
FROM sometable s
INNER JOIN whatever w ON (s.user_id = w.user_id AND s.branch_id = w.branch_id)


or pairwise:

SELECT ...
FROM sometable s
INNER JOIN whatever w ON (s.user_id, s.branch_id) = (w.user_id = w.branch_id)


For use with IN, use lists of anonymous records:

SELECT ...
FROM whatever w
WHERE (w.user_id, w.branch_id) IN ( ('a','1'), ('b', '2'), ... )


or if you have a lot of values, where this starts getting inefficient, join on a temp table. Big IN lists are bad whether they're singular values or composite.