How to Logout user with Basic auth?
The mistake is in the url parameters, it should be :

d8.com/user/logout?token=123


The _format is not needed for logout.
I found the parameter name for the token on this page https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Access%21CsrfAccessCheck.php/function/CsrfAccessCheck%3A%3Aaccess/8.3.x