MySQL - Multiple index with join and where query
WHERE table1.is_ignored = FALSE AND table1.state = 1


says to start a composite index with those two columns (in either order).  Then, looking at the rest of the SELECT, I see only sha256 being mentioned.  So, you may as make a "covering" index:

INDEX(is_ignored, state, sha256);


Meanwhile, get rid of id, assuming it is not really used elsewhere.  This will


shrink the disk footprint, thereby helping performance,
get rid of a unique index, thereby helping insert performance.


This leads to

PRIMARY KEY(sha256)


Meanwhile, table2 needs an index (possibly the PK) starting with sha256.

But... Digests (such as sha256) and UUIDs are terrible for performance due to their randomness.  Once the size of those two tables becomes more than your innodb_buffer_pool_size, performance will go downhill.  SSDs will help some.  More RAM will help a lot.  but you won't get much past 1K queries/sec.

More on building indexes.