You mustn’t use hazard warning lights while moving, except to warn traffic behind when you slow suddenly on a motorway or unrestricted dual carriageway.
Never use hazard warning lights to excuse dangerous or illegal parking.
You may also be interested in these theory test questions