Why does MariaDB choose different index use for the same data?
This should temporarily fix the statistics that appear to be screwed up:  Do ANALYZE TABLE logs;; it will take a long time (for MyISAM, but not for InnoDB).
Run CHECK TABLE logs; -- the index may be corrupted.  (This is a MyISAM-only thing to do.)
Use InnoDB, not MyISAM.  InnoDB does not need ANALYZE TABLE nearly as often, and the ANALYZE runs much faster.