UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zir5/ofXnLD90gLCvl7+Xr1Op5+2yV5cuuCcvVqNNUU=' 
WHERE 
  key_id = 'ac876d133bc937d3f6aaf4367ca576aa392c6f90c4897ddcf2bcfdf0ceca9379' 
  AND (
    token = 'zir5/ofXnLD90gLCvl7+Xr1Op5+2yV5cuuCcvVqNNUU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031