Removing secret key and replacing with replacement token