UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'liDljR3rYYHLfWtKo9jIAAKGiPBtvAkbPL6Gv79cjeE=' 
WHERE 
  key_id = '63253927a8a7f20934a102f5f909d266b22c0814c46d7d3011bd0913661462c4' 
  AND (
    token = 'liDljR3rYYHLfWtKo9jIAAKGiPBtvAkbPL6Gv79cjeE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031