If you're getting a repeating 4002 error in iTunes you can fix it by following these few steps:-
1: Go to the 'Store' tab and select 'Turn Off iTunes Match'
2: Return to the 'Store' tab and select 'Update Genius'
3: Wait for this to complete successfully, the return to the 'Store' tab once more and select 'Turn On iTunes Match'.
4: iTunes Match will now restart and succeed.
This will remove and re-create the file that iTunes Match and iTunes Genius uses and remove the problem.