UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bQOYQ3ylVWVpE4nhUrwA+mJSSe6+MVkd5hPG5l95mZI=' 
WHERE 
  key_id = '7add72cda9b63ddea4424102ed06fed24f894d3f0f998ae5b5e1b9f8287a9735' 
  AND (
    token = 'bQOYQ3ylVWVpE4nhUrwA+mJSSe6+MVkd5hPG5l95mZI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050