Flickr has its own tool to export all your account data. This article on Macworld explains the steps you need to take.
I've quoted them below:
1.Log into Flickr via the web. (The Yahoo login account requirement is going away soon, too.)
2.Click the account avatar in the upper-right corner, and select Settings.
3.In the bottom panel, “Your Flickr Data,” click Request Flickr Data
As pointed out in the comments, the above method would leave you with a large number of .zip files to download when you have 52k photos.
The java command line utility flickrdownload might be a solution there, as it
allows you to download all of your photos and the associated metadata from Flickr
I don't have a Flickr account, so I can't test, but it appears that with just two commands (one to authenticate, one to download the photos) you can download your whole library.