Update the last record with certain criteria using Rest API (Edit Record)

Update the last record with certain criteria using Rest API (Edit Record)

Hello,

I am trying to edit a record based on two criterias that are name and last entry in a column,
as of now the function is working fine and updates based on the first criteria {Empname == } but for every record, how can i set the second criteria to narrow the update record as the biggest time stamp belonging to the Empname;

as;
criteria = {empname == "Smith" && Timestamp = (Last Timestamp)}


Thanks,