This query will add X number of days to all active upgrades:
Code:
UPDATE xf_user_upgrade_active
SET end_date = end_date + X*60*60*24
But if you only want to extend some upgrades then you need to somehow specify that in the query. Or you can edit each upgrade manually like Brogan suggested.