UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mz6Ea8LwkNRJiF2G+J3AV1OY2/rHw5oAQZgUtDgarus=' 
WHERE 
  key_id = 'e5e46466cd8d760c7ddf9d8866d7d70c05dfacd6e00e6a8af30854bb1b2dcc04' 
  AND (
    token = 'mz6Ea8LwkNRJiF2G+J3AV1OY2/rHw5oAQZgUtDgarus=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017