UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yNzBKnKIxvPgiJfPg12wi85+YO/cUa5PPQYO9CQH4fM=' 
WHERE 
  key_id = '94d0eeb324018cf83f0ed3d51bbc2d79121926739d64d8ea9af7ae431b191d31' 
  AND (
    token = 'yNzBKnKIxvPgiJfPg12wi85+YO/cUa5PPQYO9CQH4fM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031