MySQL - two tables with relation one to many - retrieve "n" fields from table1 WHERE SUM of a field on table2 is less/equal/greater than "value"
This is a rather simple GROUP BY / HAVING query in table B. You then only need to join table A to get the columns you want in the result:

SELECT a.*,                   -- pick the wanted columns from A
       bg.sum_toti             -- you can have this in the results, too,
                              -- if you want
FROM a
  JOIN
  ( SELECT id, SUM(toti) AS sum_toti
    FROM b
    GROYP BY id
    HAVING SUM(toti) &gt;= ?              -- ? is the parameter, eg. 585
  ) AS bg
  ON bg.id = a.id ;





You already have an index on a (id). An index on b (id, toti) would help with efficiency. 
I suggest you ditch MyISAM and use only InnoDB engine in your databases. It's the default engine in recent versions (5.6+) and gets far more development. MyISAM is pretty much a relic and offers no advantages (it used to have some, years ago), only disdvantages.