All right, so I created a callback plugin which saves information automatically about each executed task to external database, to put it concisely it holds of lots of information about task execution (output, hostname etc) + other needed by users.
For each task unique identifier (not Anisble TASKUUID) is also generated - it is a combination of few fields.
That Custom UUID is being saved to that database as well.
The idea is to not execute any tasks in that playbook(s) more than once, for this purpose Custom UUID should be checked. Tasks shouldn't be executed more than once on a server because of irreversible actions done by those external legacy scripts. (no comments on that, can't be changed for now)
With when condition it would be problematic to check Custom_UUID for each task because it's not and can't be hardcoded (can differ).
So, my first thought was to create or rather enhance my callback plugin to GET data from DB to check whether this particular task has been already executed or not.
If yes, it should be omitted.