how to update date field in a record to null?
Use one of the suggested formats in MySQL documentation, for datetime literals, like the 'YYYY-MM-DD HH:MM:SS' format:

WHERE validity = '1947-05-18 00:00:00' ;


or the simpler (in this case, that there is no time part):

WHERE validity = '1947-05-18' ;