UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9zUKIxXLIWkdr7gt23SF2GNeqmJgdbKnMJl/ix8fb3s=' 
WHERE 
  key_id = '2b17808c9afcf1ed1fedaeb292f76ae4535dac964d867bc79c624b5288a9a037' 
  AND (
    token = '9zUKIxXLIWkdr7gt23SF2GNeqmJgdbKnMJl/ix8fb3s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042