UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xMWpAchbJQtto80zrZjjjV4jNZcVs1uFHWXoTqXIt5E=' 
WHERE 
  key_id = 'fbfcff83af21cd7ad07cd38d6f8da3e3904afb1e20651e2f0a8615d816a07372' 
  AND (
    token = 'xMWpAchbJQtto80zrZjjjV4jNZcVs1uFHWXoTqXIt5E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038