Make two different updates with two different where conditions
Do two UPDATEs.
And have a PRIMARY KEY
And two secondary indexes:
INDEX(recipient),
INDEX(writer)

If you are concerned about ACIT integrity, make a transaction:
BEGIN;
UPDATE ... WHERE writer...
UPDATE ... WHERE recipient...
COMMIT;