How do I change the primary key?
Very close. In a hook_update_N:

// Drop all primary keys.
db_drop_primary_key('table_name');
// Add primary keys.
db_add_primary_key('table_name', array('field_a', 'field_b'...);


See db_drop_primary_key and db_add_primary_key for details and links to usage.