UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/MFSb7C7UuyTSbsD3i6Biac9jUkg1mm9TnR1+1dYZvg=' 
WHERE 
  key_id = 'c85174bcf3c22f964b3b6cf67df1e7fe83c5c3db27e3bb863a2711b264740d29' 
  AND (
    token = '/MFSb7C7UuyTSbsD3i6Biac9jUkg1mm9TnR1+1dYZvg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020