Kenneth,
I tried
exec sp_msforeachdb "IF EXISTS (select name, suser_sname(sid) from sys.sysdatabases where suser_sname(sid) IN ('domain\one', 'domain\two')) BEGIN USE ?; sp_changedbowner 'sa' END"
and got error
The identifier that starts with 'IF EXISTS (select...