If you have a button in your form you can try this instead.
$crawler = $client->request('GET', $url);
$buttonCrawlerNode = $crawler->selectButton('Save');
$form = $buttonCrawlerNode->form();
$token = $form->get('name_of_form[_token]')->getValue()
where Save is the text you have in your button