I don't see a problem with doing it 7000+ times, PHP should be able to do that reasonably quickly, and I assume you're caching the sitemap. Personally, I would use built-in datetime functionality:
$datetime = '2014-01-25 08:03:17';
echo date(DATE_ATOM, strtotime($datetime));
// '2014-01-25T08:03:17+01:00'
Where +01 is for my locale, you'll have another for your timezone.
But to answer your question, it is possible to do in MySQL, too - but it won't be locale aware, so you'll have to hardcode the -05:00 part in.
SELECT DATE_FORMAT(datetime_field, '%Y-%m-%dT%H:%m:%s-05:00') FROM table LIMIT 1
Notice also that it should be -05:00 according to the W3C standards, not -5:00.