UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0xVyeQ6H1CybbFfIm9tjx0jbAB/LHqY6vRC8KgSzFKk=' 
WHERE 
  key_id = '07f361742aee1c90ea1432b2be6d1481a17f240b44d8bdd39c7745732c7fd646' 
  AND (
    token = '0xVyeQ6H1CybbFfIm9tjx0jbAB/LHqY6vRC8KgSzFKk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021