Mage_Catalog_Model_Resource_Product_Flat_Indexer::prepareFlatTable() is throwing this exception, when your product has more than maximum allowed
indexes(64 in your case).
This maximum usually is defined in
app/code/core/Mage/Catalog/etc/config.xml and matches the maximum number of 64 keys allowed by default mySQL installations, before they error with
ERROR 1069: Too many keys specified. Max 64 keys allowed
The issue you are experiencing is not how many attributes your products have, but how many of this attributes are filterable and/or sortable.
Mage_Catalog_Model_Resource_Product_Flat_Indexer::getFlatIndexes() to find out how Magento reaches a total of 521 indexes.
For a quick check you can also have a look at your
catalog_eav_attribute table and check how many attributes are filterable (
is_filterable = 1) and/or sortable (
used_for_sort_by = 1)
So once know how many filterable and/or sortable attributes you have you can eider lower the number of them or increase the max allowed number to match your needs.