Instead of looping and making multiple calls, just use a single database call
The subquery X identifies duplicates of BILLING_ID, GAME_ID.
Then we join back to get USER_ID
Note: you must use this standard SQL and not the inane MySQL GROUP BY extensions
SELECT
t.BILLING_ID, t.USER_ID
FROM
(
SELECT
BILLING_ID, GAME_ID, COUNT(*)
FROM
tc_services
GROUP BY
BILLING_ID, GAME_ID
HAVING
COUNT(*) > 1
) X
JOIN
tc_services t ON X.BILLING_ID = t.BILLING_ID AND X.GAME_ID = t.GAME_ID