A join would be better, but for the minimum changes to what you've written you can use the fact that the subquery doesn't need the column in its where clause to be in the select. i.e. instead of
id IN (
SELECT user_id, code
FROM coupon_used WHERE code ='xyz'
)
you can use
id IN (
SELECT user_id
FROM coupon_used WHERE code ='xyz'
)