UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4CvhDOIHtOwaCPsomw3npB785+oanF2Vi/N9xLZ7wek=' 
WHERE 
  key_id = '25930513ff7025f5f7e683a6cb3fd59610e551d72aa4bff00f67d39aae803d65' 
  AND (
    token = '4CvhDOIHtOwaCPsomw3npB785+oanF2Vi/N9xLZ7wek=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035