Giving yourself 45 minutes from midtown to LGA at 530PM on a Friday might be a stretch, and if it is raining, forget about it. Would do an hour for good weather, maybe a tad more. and closer to 90 minutes for bad weather. Particularly if your flight is the last out for the day.