Given that the control panel for comments (Add-ons > Modules > Comments) is a little limited in its date filtering, and if you have lots and lots of comments it would be a chore, a query is probably the best route.
A query that would close all comment entries before Sat, 01 Jan 2011 00:00:00 GMT:
SET status = 'c'
WHERE comment_date < 1293840000
OR...If what you meant was to not allow new comments on entries older than two years then here is a query to do that (or just see @Derek's answer!):
SET allow_comments = 'n'
WHERE entry_date < 1293840000
You can use Epoch Converter to get a Unix timestamp for your comment cut-off date.