UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '44z7OXHNwOXM+Uj5bSCBL4UBI7eN6QK/Vv+uED9KQIo=' 
WHERE 
  key_id = 'a2c6267b4ff45291c4dbf79190b8c06061fae60bcfecd724d6976de01611c630' 
  AND (
    token = '44z7OXHNwOXM+Uj5bSCBL4UBI7eN6QK/Vv+uED9KQIo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031